package service

import (
	"gowork/combinedQuery/model"
)

type OrderService struct {
	Mo *model.Orders
	Mmo *model.MeiyeOrders
	Qtc *model.CallLog
}

func NewOrderService(order *model.Orders, meiye *model.MeiyeOrders, call *model.CallLog)*OrderService{
	return &OrderService{Mo:order, Mmo: meiye, Qtc:call}
}


func (os *OrderService)QueryOrderList(mqo *model.QueryOrder)([]*model.Orders, int, error){

	return os.Mo.CombinedQuery(mqo)

}

func (os *OrderService)QueryStatistical(ms*model.MeiyeStatistical)([]*model.TotalConsumptionType, int, error){

	return os.Mmo.StatisticalQuery(ms)

}

func (os *OrderService)QueryCall(ms*model.QueryTotalCall)([]*model.TotalAdviserCallLog, int, error){

		return os.Qtc.QueryCallLog(ms)

}